﻿<!DOCTYPE html>

<html>
<head>
    <script src="~/Content/front-end/js/jquery-2.0.3.min.js"></script>

    <link href="~/Content/front-end/bootstrap/css/bootstrap-theme.min.css" rel="stylesheet" />
    <link href="~/Content/front-end/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
    <script src="~/Content/front-end/bootstrap/js/bootstrap.min.js"></script>
    <link href="~/Content/front-end/css/style.css" rel="stylesheet" />

    <script src="~/Content/front-end/js/jqBootstrapValidation-2.0.0.min.js"></script>

    <script src="~/Content/front-end/js/cloud-zoom.1.0.2.js"></script>
    <script src="~/Content/front-end/js/get_num_replies.js"></script>
    <script src="~/Content/front-end/js/jquery.min.js"></script>


    <link href="~/Content/front-end/css/cloud-zoom.css" rel="stylesheet" />
    <link href="~/Content/front-end/css/main.css" rel="stylesheet" />
    
    <meta name="viewport" content="width=device-width" />
    <title>@ViewBag.Title</title>

</head>
<body>
    <div id="fb-root"></div>
    <script>(function (d, s, id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return;
    js = d.createElement(s); js.id = id;
    js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=1498647547026177";
    fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
    <!-- start header -->
    <header class="header">
        <div class="full-header">
        </div>
        <!-- start container -->
        <div class="container">
            <!-- start holder -->
            <div class="holder">
                <!-- start logo-->
                <div class="row">
                    <div class="col-md-2">
                        <a href="~/Home">
                            <img id="mainlogo" />
                        </a>
                    </div>
                    <!-- start login... -->

                    @if (!WebSecurity.IsAuthenticated)
                    {
                        <div class="col-md-10">
                            <ul class="metaLink">
                                <li>
                                    <span class="metaLink">HOTLINE: HCM (08) 3877 5469 - HN (04) 7888 3838</span>
                                </li>
                                <li>
                                    <span class="hdSeperator">|</span>
                                </li>
                                <li>
                                    <a class="metaLink" href="#">Hỗ trợ</a>
                                </li>
                                <li>
                                    <span class="hdSeperator">|</span>
                                </li>
                                <li>
                                    <a class="metaLink" href="#" data-toggle="modal" data-target="#myModal">Đăng nhập</a>
                                </li>

                                <li>
                                    <span class="hdSeperator">|</span>
                                </li>
                                <li>
                                    <a class="metaLink" href="~/Register">Đăng kí tài khoản</a>
                                </li>
                            </ul>
                            <br />
                            <div class="fb-like" data-href="http://www.eshopec18.somee.com/"
                                data-layout="standard" data-action="like" data-show-faces="true" data-share="true">
                            </div>
                        </div>
                    }
                    else
                    {
                        <div class="col-md-10">
                            <ul class="metaLink">
                                <li>
                                    <span class="metaLink">HOTLINE: HCM (08) 3877 5469 - HN (04) 7888 3838</span>
                                </li>
                                <li>
                                    <span class="hdSeperator">|</span>
                                </li>
                                <li>
                                    <a class="metaLink" href="#">Hỗ trợ</a>
                                </li>
                                <li>
                                    <span class="hdSeperator">|</span>
                                </li>
                                <li>
                                    <a class="metaLink" href="#">Danh sách mong muốn</a>
                                </li>
                                <li>
                                    <span class="hdSeperator">|</span>
                                </li>
                                <li>
                                    <span class="metaLink">Xin chào </span>
                                    <b>
                                        <a class="metaLink" href="~/User/UpdateUser">@WebSecurity.CurrentUserName</a>
                                    </b>
                                </li>
                                <li>
                                    <span class="hdSeperator">|</span>
                                </li>
                                <li>
                                    <a class="metaLink" href="~/Account/LogOff">Đăng xuất</a>
                                </li>
                            </ul>
                            <br />
                            <div class="fb-like" data-href="http://www.eshopec18.somee.com/"
                                data-layout="standard" data-action="like" data-show-faces="true" data-share="true">
                            </div>
                        </div>
                    }
                    <!-- end login... -->
                </div>
                <!-- end logo -->
            </div>
            <!-- end holder -->

            <!-- start mainbar -->
            <div class="mainbar row">
                <div class="col-md-2">
                    @{Html.RenderAction("LoadCategory", "Category");}
                </div>

                <!-- start search -->
                <div class="col-md-8">
                    <div class="input-group">
                        <input type="text" class="form-control" placeholder="Tìm kiếm theo sản phẩm, danh mục hay nhãn hàng mong muốn">
                        <div class="input-group-btn">
                            <button type="button" class="btn btn-default">Tìm kiếm</button>
                        </div>
                    </div>
                </div>
                <!-- end search -->

                <!-- start cart -->
                <div class="col-md-2">
                    <a href="~/Cart">
                        <button type="button" class="btn btn-primary center-block">
                            <i class="glyphicon glyphicon-shopping-cart"></i>
                            Giỏ hàng
                        </button>
                    </a>
                </div>
                <!-- end cart -->
                <div class="clearfix"></div>
            </div>
            <!-- start mainbar -->

        </div>
        <!-- end container -->
    </header>
    <!-- end header -->

    @RenderBody()

    <footer class="footer">
        <div class="container">
            <hr />
            <!-- start guide -->
            <div class="row">
                <div class="col-md-2">
                    <h4>Thông tin</h4>
                    <ul class="link-list">
                        <li>
                            <a href="~/Information/LienHe" title="Liên hệ">Liên hệ</a>
                        </li>
                        <li>
                            <a href="~/Information/GioiThieu">Giới thiệu</a>
                        </li>
                        <li>
                            <a href="~/Information/DieuKhoan">Điều khoản</a>
                        </li>
                    </ul>
                </div>
                <div class="col-md-2">
                    <h4>Hỗ trợ khách hàng</h4>
                    <ul class="link-list">
                        <li>
                            <a href="~/Information/ChinhSachGiaoHang">Chính sách giao hàng</a>
                        </li>
                        <li>
                            <a href="~/Information/HuongDanThanhToan">Cách thức thanh toán</a>
                        </li>
                        <li>
                            <a href="~/Information/HuongDanMuaHang">Hướng dẫn mua hàng</a>
                        </li>
                        <li>
                            <a href="~/Information/GopY">Góp ý</a>
                        </li>
                    </ul>
                </div>
                <div class="col-md-2">
                    <h4>Cách thức thanh toán</h4>
                    <img src="~/Images/master_card.png" />
                    <br />
                    <img src="~/Images/visa-card.png" />
                    <br />
                    <img src="~/Images/PayPal.png" />
                </div>
                <div class="col-md-2">
                    <h4>Các chứng nhận</h4>
                    .
                    <br />
                    .
                    <br />
                    .
                </div>
                <div class="col-md-4">
                    <h4>Những nhãn hàng được yêu thích</h4>
                    .
                    <br />
                    .
                    <br />
                    .
                </div>
            </div>
            <!-- end guide -->
            <hr />
            <!-- start another system -->
            <div class="row">
                <div class="col-md-4">
                    <span class="hd1">EShop toàn cầu:
                        <a href="#" target="_blank" title="EShop-ViệtNam">
                            <img src="~/Images/Vietnam-Flag-icon.png" style="max-width: 30px; max-height: 25px" />
                        </a>
                    </span>
                </div>
                <!-- start copy-right -->
                <div class="col-md-4 copy-right">
                    Copyright 2013 - 2014<br />
                    EShop.vn
                </div>
                <!-- end copy-right -->
                <!-- start social network -->
                <div class="col-md-4" style="text-align: right">
                    <span class="hd1">Liên kết mạng xã hội:
                        <a href="#" title="Facebook" target="_blank">
                            <img src="~/Images/facebook-icon.png" style="max-width: 30px; max-height: 25px" />
                        </a>
                        <a href="#" title="GooglePlus" target="_blank">
                            <img src="~/Images/GooglePlus-icon.png" style="max-width: 30px; max-height: 25px" />
                        </a>
                        <a href="#" title="Twitter" target="_blank">
                            <img src="~/Images/Twitter-icon.png" style="max-width: 30px; max-height: 25px" />
                        </a>
                        <a href="#" title="Youtube" target="_blank">
                            <img src="~/Images/Youtube-icon.png" style="max-width: 30px; max-height: 25px" />
                        </a>
                    </span>
                </div>
                <!-- end social network -->
            </div>
            <!-- end another system -->
            <hr />
            <!-- start text-footer-bottom -->
            <div class="text-bottom text-center" id="thongtincongty">
                @*                <b>CÔNG TY TRÁCH NHIỆM HỮU HẠN 5 THÀNH VIÊN - EC18</b><br />
                Địa chỉ: 227 Nguyễn Văn Cừ, Quận 5, Thành phố Hồ Chí Minh, Việt Nam.<br />
                Thành lập và phát triển vào tháng 10/2013 - Điện thoại: (08) 3877 5469<br />
                Email: nguyetquoi@gmail.com*@
            </div>
            <!-- end text-footer-bottom -->
        </div>
    </footer>

    <!-- Modal login -->
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title" id="myModalLabel">Đăng nhập</h4>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal" id="loginform" method="post" action="Account/Login">
                        <div class="form-group">
                            <div class="col-sm-offset-3 col-sm-9">
                                <label id="wrongLogin" style="display: none; color: red; font-weight: bold">
                                    Tên đăng nhập hoặc mật khẩu bị sai
                                </label>
                            </div>
                            <label for="inputEmail3" class="col-sm-3 control-label">Tên đăng nhập</label>
                            <div class="col-sm-9">
                                <input type="text" class="form-control" id="nameLogin" name="UserName" placeholder="Email">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="inputPassword3" class="col-sm-3 control-label">Mật khẩu</label>
                            <div class="col-sm-9">
                                <input type="password" class="form-control" id="passwordLogin" name="Password" placeholder="Password">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-offset-3 col-sm-9">
                                <div class="checkbox">
                                    <label>
                                        <input type="checkbox" name="RememberMe">
                                        Ghi nhớ cho lần đăng nhập sau
                                    </label>@*data-toggle="modal" data-target="#myModalPass"*@
                                    <a href="#" id="forgotPassLink">Quên mật khẩu</a>
                                </div>
                            </div>
                        </div>
                        <div class="form-group" id="hidden-login">
                            <div class="col-sm-offset-3 col-sm-9">
                                <button class="btn btn-default" id="login">Đăng nhập</button>
                                <button type="reset" class="btn btn-default">Hủy</button>
                            </div>
                        </div>
                    </form>



                    <form id="forgotPassForm" class="form-horizontal" method="post" action="Account/forgotPassword" style="display: none">
                        <div class="form-group">
                            <div class="col-sm-offset-3 col-sm-9">
                                <label id="wrongEmail" style="display: none; color: red; font-weight: bold">
                                    Email không chính xác. Vui lòng nhập lại.
                                </label>
                                <label id="rightEmail" style="display: none; color: green; font-weight: bold">
                                    Vui lòng kiểm tra hộp thư để nhận mật khẩu mới.
                                </label>
                            </div>
                            <label for="inputEmail3" class="col-sm-3 control-label">Email</label>
                            <div class="col-sm-9">
                                <input type="email" class="form-control" id="emailForgot" placeholder="Hãy nhập email để lấy lại mật khẩu" />
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-offset-3 col-sm-9">
                                <button class="btn btn-default" id="pass">Lấy mật khẩu</button>
                                <button type="reset" class="btn btn-default" id="cancelResetPass">Hủy</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>
    <!-- end modal login-->
    <script type="text/javascript">
        $(document).ready(function () {

            $('#forgotPassLink').click(function () {
                $('#forgotPassForm').fadeIn(200);
                $('#hidden-login').fadeOut(100);
            });

            $('#cancelResetPass').click(function () {
                $('#forgotPassForm').fadeOut(100);
                $('#hidden-login').fadeIn(200);
            });

            $('#forgotPassForm').submit(function (e) {
                e.preventDefault();
                var data = { Email: $('#emailForgot').val() };
                $.post('/Account/forgotPassword', data, function (data) {
                    if (data.status == true) {
                        $('#wrongEmail').hide();
                        $('#rightEmail').show();
                    }
                    else {
                        $('#rightEmail').hide();
                        $('#wrongEmail').show();
                    }
                });
            });

            $('#loginform').submit(function (e) {
                e.preventDefault();
                var UserName = $('#nameLogin').val();
                var Password = $('#passwordLogin').val();
                var dataLogin = { UserName: $('#nameLogin').val(), Password: $('#passwordLogin').val() }
                $.post('/Account/Login', dataLogin, function (data) {
                    if (data.status == true) {
                        location.reload();
                    }
                    else {
                        $('#wrongLogin').show();
                    }
                });
            });


            var apiurl = "http://localhost:17280";
            //load thong tin cong ty
            $.getJSON(apiurl + "/Admin/AdminWebConfig/GetInfo", function (data) {
                var info = $("<div/>").html(data.Info).text();
                $('#thongtincongty').html(info);
            });
            //load thong tin gioi thieu
            $.getJSON(apiurl + "/Admin/AdminWebConfig/GetIntro", function (data) {
                var intro = $("<div/>").html(data.Intro).text();
                $('#gioithieucongty').html(intro);
            });

            //lấy logo và màu nền
            $.getJSON(apiurl + "/Admin/AdminWebConfig/GetInterface", function (data) {
                //var bgcolor = $("<div/>").html(data.bgcolor).text();
                $("body").css("background-color", data.bgcolor);
                $("#mainlogo").attr("src", data.logourl);
            });

        });
    </script>

    @RenderSection("scripts", required: false)
</body>
</html>
